/******************************

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <iostream>
//for setw, precision()
#include <iomanip>
using namespace std;

int getS(float a, float b, float c, float &s){
	if(a+b<c || a+c<b || b+c<a){
		return -1;
	}
	float p = (a+b+c)/2;
	s = sqrt(p*(p-a)*(p-b)*(p-c));
	return 1;
}

void main(){
	float a, b, c,s;
	while (true)
	{
		cout << "\nNhap a: ";
		cin >> a;
		cout << "Nhap b: ";
		cin >> b;
		cout << "Nhap c: ";
		cin >> c;
		int r = getS(a,b,c,s);
		cout<<setiosflags(ios::showpoint)<<setprecision(2);
		
		switch (r)
		{
		case 1:

			cout << "Dien tich tam giac: "<<s;
			break;
		case -1:
			cout<<"Khong phai tam giac";
			break;		
		}
	}

	getch();
}

/**********************************/